************************************* * Program: SETUP.EXE * * Version: 1.0a * * Date: 18th October 1994 * * Author: Simon Barrett * ************************************* Description: ------------ SETUP.EXE is a replacement for the file of the same name provided by Microsoft as part of the Visual Basic Setup Kit. This version of Setup differs from the Microsoft program in that the files required for running the main setup program are copied to a temporary directory which is removed once the main setup program has finished. This has the benefit that: * It is possible to install a Visual Basic program even if another VB program is running. * Setup will copy the setup files even if there is a clash with open, write protected or older versions of files. Operation: ---------- Once SETUP is run it carries out the following: * Creates a temporary directory (BLACKCAT.TMP) in the Windows directory. * Copies the files listed in SETUP.LST to this directory (See description of SETUP.LST below). * Runs the main installation program (this is the first file in the file list). * Deletes the files in the temporary directory and removes the directory. SETUP.LST: ---------- A SETUP.LST file must be included on the first installation disc and must take the following format. * Files that are to be copied by SETUP are listed on separate lines. * The part of the line before the = sign is the name of the file on the setup disc. * The part after the = sign is the name of the file once it is copied to the temporary directory. * Comments can be included staring with a semi-colon. * There is a limit of 20 files. * All files to be copied by SETUP must be on the first disc. * Setup will copy and decompress compressed files. Example: -------- mysetup.ex_ = mysetup.exe vbrun200.dl_ = vbrun200.dll threed.vb_ = threed.vbx ver.dl_ = ver.dll blackcat.dl_ = blackcat.dll Also included with this version of SETUP.EXE is BLACKCAT.DLL. BLACKCAT.DLL is a replacement for SETUPKIT.DLL and is needed if the main setup program is to run correctly. See the section below on adapting SETUP1.MAK for use with this version of SETUP. Adapting SETUP1.MAK for use with SETUP.EXE: ------------------------------------------- Because files are copied to a temporary directory there are a few implications for the format of the example Setup program provided with Visual Basic. * All 'Declare' statements for SETUPKIT.DLL should be removed. * The following Declare statement should be used instead: Declare Function DiskSpaceFree Lib "BLACKCAT.DLL" (ByVal Drive As Integer) As Long Function GetDiskSpaceFree (drive As String) As Long Dim d As Integer d = (Asc(UCase$(Left$(drive, 1)))) - 64 GetDiskSpaceFree = DiskSpaceFree(d) End Function * d represents the drive for which information about the amount of free space is required A: = 1, B: = 2, C: = 3 etc. * If changes are made to the current drive and/or directory as in 'CreatePath' and 'IsPathValid' the drive and directory should be returned to App.Path before a call is made to a 'dll'. This is necessary as Visual Basic loads a DLL when a call is made to a DLL function rather than when the program loads. * SETUP passes the source path with a trailing '\' as a parameter when it runs the main installation program. Registering SETUP.EXE: ---------------------- By registering SETUP.EXE you will obtain the following benefits: * Receive full version without 'Register' message. * Receive technical support and advice concerning the use of SETUP.EXE and BLACKCAT.DLL * Receive updates from time to time. The cost of registering is $12 by contacting me at: Simon Barrett The Barn, Cwm Camlais, Brecon, Powys, U.K. LD3 8TD Phone +44 (0) 874 636835 FAX +44 (0) 874 636835 Compuserve: 100102,1247 Internet: 100102,1247@compuserve.com Windows is a trademark of the Microsoft Corporation.